1. Field of the Invention
The present invention relates to a position control apparatus to be controlled using a servomotor, and more particularly, to a position control apparatus which can minimize a positioning time by optimizing an accelerating command for the position control apparatus.
2. Description of the Related Art
FIG. 5 is a block diagram showing an example of conventional position control apparatus. This position control apparatus comprises a numerical control divider 10, a servo control divider 20, a motor 30, and a position detector 40. In the numerical control divider 10, the program interpreter 12 generates a desired value data MD according to the content of the program input to part program storage section 11. A function generating section 15a calculates a speed unit quantity N (n) on the basis of the maximum speed unit quantity Nmax set as a parameter into the maximum speed storage section 13, the accelerating unit quantity xcex94Na and the decelerating unit quantity xcex94Nb set as parameters into the acceleration storage section 14, and the desired value data MD, and then outputs the calculated N (n) to the servo control divider 20. The servo control divider 20 generates a position command CON by integrating the output speed unit quantity N (n) with respect to time by means of an integrator 21. Next, a position and speed control section 22 generates a torque command MT on the basis of the position command CON and the detected position APA detected by a position detector 40, and supplies the torque command MT to the motor 30 via an inverter 23 to drive the motor 30. In this case, because the position detector 40 is connected to the motor 30 by means of a coupling, the motor 30 is controlled by a position feedback control through feeding back the detected position APA detected thereby to the position and speed control section 22.
FIG. 6 is a flow chart showing the operation of the function generating section 15a shown in FIG. 5. A program interpreter 12 generates the desired value data MD according to the content of the program input to the part program storage section 11, and supplies the desired value data MD to the function generating section 15a. 
The function generating section 15a calculates the difference between the position command CON of the desired value data MD and the detected position APA to obtain a residual distance DR (S1).
Next, the difference between the residual distance DR and a deceleratable distance DD is calculated, and then mode discrimination is carried out to discriminate whether a speed unit quantity N (n+1) at the next step should be set to an accelerating mode or a decelerating mode according to the polarity of the calculated difference. In other words, if DR greater than DD, then the discrimination shows an accelerating mode. On the contrary, if DRxe2x89xa6DD, then the discrimination shows a decelerating mode. In this case, the deceleratable distance DD is calculated by executing an integral computation on the basis of the present speed unit quantity N (n) and the decelerating unit quantity xcex94Nb set as a parameter beforehand, to determine the decelerating time (S2).
When an accelerating mode has been discriminated at S2, the difference between the present speed unit quantity N (n) and the maximum speed unit quantity Nmax set as a parameter into the maximum speed storage section 13 is calculated. Then, the mode discrimination is executed to discriminate whether the speed unit quantity N (n+1) at the next step should be set to an accelerating mode or a constant speed mode according to the polarity of the calculated difference (S3).
When an accelerating mode has been discriminated at S3, Nxe2x80x2 (n+1) is calculated by adding the accelerating unit quantity xcex94Na, set as a parameter into the acceleration storage section 14, to the present speed unit quantity N (n) (S4a).
Next, the difference between the Nxe2x80x2 (n+1) calculated at S4a and the maximum speed unit quantity Nmax set as a parameter into the maximum speed storage section 13 is calculated. Then, the polarity of the calculated difference is discriminated (S5).
When the result of the calculation at S5 is larger than zero, that is, Nxe2x80x2 (n+1)xe2x88x92Nmax greater than 0, the speed unit quantity N (n+1) at the next step is decided as N (n+1)=Nmax (S6).
When the result of the calculation at S5 is smaller than or equal to zero, that is, Nxe2x80x2 (n+1)xe2x88x92Nmaxxe2x89xa60, the speed unit quantity N (n+1) at the next step is decided as N (n+1)=Nxe2x80x2 (n+1) (S7).
On the other hand, when a constant speed mode has been discriminated at S3, because the present speed unit quantity N (n) is equal to Nmax, the speed unit quantity at the next step is decided as N (n+1)=Nmax (S8).
When a decelerating mode has been discriminated at S2, the speed unit quantity N (n+1) at the next step is calculated by subtracting the decelerating unit quantity xcex94Nb, set as a parameter into the acceleration storage section 14, from the present speed unit quantity N (n) (S9).
The upper figure of FIG. 7 shows a change of the speed unit quantity N (n) and a waveform of a motor speed when a desired position has been given. In this waveform of a motor speed, trz shows an accelerating period, tfz a decelerating period, and tz a positioning period necessary for arriving at the desired position. The speed unit quantity N (n) used as a position command is generated in the function generating section 15a for every calculation period T.
A period from (1) to (2) shows a period for an accelerating mode. During this period, a position command is generated by adding the accelerating unit quantity xcex94Na, set as a parameter into the acceleration storage section 14, to the present speed unit quantity N (n). Therefore, the waveform of the motor speed shows constant acceleration having a positive inclination. Time t3 shows the end of the accelerating period where the N (n) is equal to Nmax.
A period (3) shows a period for a constant speed mode. During this period, a position command is equal to the maximum speed unit quantity Nmax.
A period from (4) to (5) shows a period for a decelerating mode. During this period, a position command is generated by subtracting the decelerating unit quantity xcex94Nb, set as a parameter into the acceleration storage section 14, from the present speed unit quantity N (n). Therefore, the waveform of the motor speed shows constant acceleration having a negative inclination.
The lower figure of FIG. 7 shows a waveform of motor torque. In this figure, Tq1 is accelerating torque during the period from (1) to (2), Td frictional torque during the period (3), and Ts decelerating torque during the period from (4) to (5).
FIG. 8 is a diagram showing an output torque characteristic of a motor. The maximum output torque of the motor varies with a change of the motor speed as follows:
In the range where (0xe2x89xa6motor speed less than Nc), the maximum output torque shows a constant value of Tqmax (constant torque region). This is caused by the fact that the electric current to be supplied to motor 30 is restricted by the servo control divider 20.
In the range where (Ncxe2x89xa6motor speed less than Nmax), the maximum output torque shows a curve connecting a point [Nc, Tqmax] and a point [Nmax, Tq1] in a coordinate system of [motor speed, motor torque]. Relationships between the coordinates of these two points are (Nc less than Nmax) and (Tqmax greater than Tq1). In other words, the motor torque decreases with increase of the motor speed (power supply saturation region).
This is caused by the fact that an induced voltage in a motor increases in proportion to the motor speed, and the voltage difference between the induced voltage and the DC voltage supplied to the inverter 23 decreases, and consequently the motor current decreases below the lower limit in the servo control divider 20.
A position command in the accelerating mode is represented by constant acceleration having a positive inclination, and is written as
N(t)=(Nmax/trz)xc2x7t.xe2x80x83xe2x80x83(Eq. 1)
In this case, it is necessary to determine an accelerating period trz so that the output torque is lower than the maximum output torque curve illustrated with a thick line in FIG. 8. Consequently, the accelerating period trz is written in terms of xcfx89max, which is the maximum speed unit quantity Nmax reduced to angular velocity, and Tq1 which is a minimum value of the maximum output torque curve in the range from 0 to Nmax, as
trz=Jxc2x7xcfx89max/(Tq1xe2x88x92Td),xe2x80x83xe2x80x83(Eq. 2)
where J is the total sum of the motor inertia and the load inertia to be coupled to the motor, and Td is the frictional torque.
When the waveforms of the motor speed and the motor torque shown in FIG. 7 are overwritten on the output torque characteristic curve of the motor shown in FIG. 8, arrows (1), (2), (3), (4), and (5) are obtained.
In the prior art described above, a position command in the accelerating mode is generated by adding the accelerating unit quantity xcex94Na, set as a parameter, to the present speed unit quantity N (n) so that constant acceleration can be obtained. Therefore, the accelerating period must be such that the output torque is decided by the minimum value of the maximum output torque curve in the output torque characteristic curve of the motor, that is Tq1, at the maximum speed unit quantity Nmax. Consequently, there is such a problem that the accelerating period is comparatively longer.
An object of the present invention is to solve the above problem and to provide an position control apparatus which can shorten a positioning time by reducing the accelerating period through generating a position command so that a motor torque coincides with the maximum output torque curve of the motor.
The present invention provides a position control apparatus in which a position command is generated on the basis of a desired value data, a speed unit quantity, and an accelerating unit quantity so that output torque of a servomotor is smaller than the maximum output torque of the servomotor, and the servomotor is driven by the torque command calculated on the basis of the position command, the position control apparatus comprising: means for generating a first position command so as to give constant acceleration by adding the accelerating unit quantity xcex94Naa, set as a parameter beforehand, to the speed unit quantity N (n); means for generating a second position command by calculating the accelerating unit quantity using an exponential function expression and by adding the calculated result to the speed unit quantity N (n); and means for generating a position command by comparing the present speed unit quantity N (n) and the function change speed unit quantity Nc set as a parameter beforehand and by selecting either of the position command generating means described above on the basis of the compared result.
According to the present invention, two types of position commands such as a constant acceleration type and an exponential function acceleration type can be generated in accordance with the maximum output torque curve of the output torque characteristics of a motor, and an optimum command between these position commands can be selected. Consequently, it is easily realized to shorten the accelerating period and the positioning time.